package com.iflytek.education.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.iflytek.common.annotation.Excel;
import com.iflytek.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 会员对象 ucenter_member
 *
 * @author isahino
 * @date 2023-09-21
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("ucenter_member")
public class UcenterMember extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 会员id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 微信唯一标识
     */
    @Excel(name = "微信唯一标识")
    private String openid;

    /**
     * 手机号
     */
    @Excel(name = "手机号")
    @NotBlank(message = "手机号不可为空")
    private String mobile;

    /**
     * 密码
     */
    @NotBlank(message = "密码不可为空")
    private String password;

    /**
     * 昵称
     */
    @Excel(name = "昵称")
    private String nickname;

    /**
     * 性别
     */
    @Excel(name = "性别")
    private Integer sex;

    /**
     * 年龄
     */
    @Excel(name = "年龄")
    private Integer age;

    /**
     * 用户头像
     */
    private String avatar;

    /**
     * 用户签名
     */
    private String sign;

    /**
     * 账号状态
     */
    @Excel(name = "账号状态")
    private Integer isDisabled;

    /**
     * 逻辑删除 1（true）已删除， 0（false）未删除
     */
    @TableLogic
    private Integer isDeleted;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(fill = FieldFill.INSERT)
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gmtModified;

}
